/*
 * Editor Styles for Bulma Integration
 * This file provides enhanced styling for the block editor with Bulma CSS
 */

/* Link styles */
a {
    text-decoration-thickness: 1px !important;
    text-underline-offset: 0.1em;
}

/* Bulma integration for editor */
.editor-styles-wrapper {
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans,
        Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
}

/* Ensure Bulma styles work in editor */
.editor-styles-wrapper .wp-block {
    margin-bottom: 0.75rem;
}

/* Button styles in editor */
.editor-styles-wrapper .wp-block-button__link {
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.15s ease-in-out;
}

/* Group block styling in editor */
.editor-styles-wrapper .wp-block-group.has-background {
    border-radius: 4px;
    padding: 1rem;
}

/* Image block styling */
.editor-styles-wrapper .wp-block-image img {
    border-radius: 4px;
    max-width: 100%;
    height: auto;
}

/* Quote block styling */
.editor-styles-wrapper .wp-block-quote {
    border-left: 3px solid #485fc7;
    padding-left: 1rem;
    margin: 1rem 0;
}

/* Code block styling */
.editor-styles-wrapper .wp-block-code {
    background-color: #f5f5f5;
    border-radius: 4px;
    padding: 0.75rem;
    font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
    font-size: 0.875rem;
}

/* List block styling */
.editor-styles-wrapper .wp-block-list li {
    margin-bottom: 0.25rem;
}

/* Heading block styling */
.editor-styles-wrapper .wp-block-heading h1,
.editor-styles-wrapper .wp-block-heading h2,
.editor-styles-wrapper .wp-block-heading h3,
.editor-styles-wrapper .wp-block-heading h4,
.editor-styles-wrapper .wp-block-heading h5,
.editor-styles-wrapper .wp-block-heading h6 {
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 1rem;
}

/* Columns block styling */
.editor-styles-wrapper .wp-block-columns {
    margin-bottom: 1rem;
}

.editor-styles-wrapper .wp-block-column {
    padding: 0.5rem;
}

/* Search block styling */
.editor-styles-wrapper .wp-block-search__input {
    border: 1px solid #dbdbdb;
    border-radius: 4px;
    padding: 0.5rem 1rem;
}

.editor-styles-wrapper .wp-block-search__button {
    background-color: #485fc7;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    margin-left: 0.5rem;
}

/* Latest posts block styling */
.editor-styles-wrapper .wp-block-latest-posts li {
    padding: 0.5rem;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(10, 10, 10, 0.1);
    margin-bottom: 0.5rem;
}

/* Separator block styling */
.editor-styles-wrapper .wp-block-separator {
    border: none;
    border-top: 1px solid #dbdbdb;
    margin: 1rem auto;
    max-width: 80px;
}

/* Full width alignment in editor */
.editor-styles-wrapper .wp-block[data-align="full"] {
    max-width: none;
}

/* Wide alignment in editor */
.editor-styles-wrapper .wp-block[data-align="wide"] {
    max-width: 1200px;
}

/* Responsive adjustments for editor */
@media (max-width: 782px) {
    .editor-styles-wrapper .wp-block-columns {
        flex-direction: column;
    }

    .editor-styles-wrapper .wp-block-column {
        margin-bottom: 1rem;
    }

    .editor-styles-wrapper .wp-block-search {
        flex-direction: column;
    }

    .editor-styles-wrapper .wp-block-search__button {
        margin-left: 0;
        margin-top: 0.5rem;
    }
}

/* Dark mode support for editor */
[data-theme="dark"] .editor-styles-wrapper {
    background-color: #1a1d21;
    color: #e8e8e8;
}

[data-theme="dark"] .editor-styles-wrapper .wp-block-code {
    background-color: #2d3748;
    color: #e2e8f0;
}

[data-theme="dark"] .editor-styles-wrapper .wp-block-latest-posts li {
    background-color: #2d3748;
    color: #e2e8f0;
}
